"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . views import viewsIndex,viewsUsers,viewsCates,viewsGoods,viewsOrders

urlpatterns = [
    # 后台首页
    url(r'^$',viewsIndex.index,name='myadmin_index'),
    url(r'^login/$',viewsIndex.myadminlogin,name='myadmin_login'),
    url(r'^verifycode/$',viewsIndex.verifycode,name='myadmin_verifycode'),
    url(r'^logout/$',viewsIndex.myadminlogout,name='myadmin_logout'),

    # 会员管理
    url(r'^user/add/$',viewsUsers.useradd,name='myadmin_user_add'),
    url(r'^user/index/$',viewsUsers.userindex,name='myadmin_user_index'),
    url(r'^user/del/(?P<uid>[0-9]+)/$',viewsUsers.userdel,name='myadmin_user_del'),
    url(r'^user/edit/(?P<uid>[0-9]+)/$',viewsUsers.useredit,name='myadmin_user_edit'),
    url(r'user/logout/$',viewsUsers.userlogout,name='myadmin_user_logout'),

    # 商品分类管理
    url(r'^cates/add/$',viewsCates.catesadd,name='myadmin_cates_add'),
    url(r'^cates/index/$',viewsCates.catesindex,name='myadmin_cates_index'),
    url(r'^cates/del/$',viewsCates.catesdel,name='myadmin_cates_del'),
    url(r'^cates/edit/$',viewsCates.catesedit,name='myadmin_cates_edit'),

    # 商品管理
    url(r'^goods/add/$',viewsGoods.goodsadd,name='myadmin_goods_add'),
    url(r'^goods/insert/$',viewsGoods.goodsinsert,name='myadmin_goods_insert'),
    url(r'^goods/index/$',viewsGoods.goodsindex,name='myadmin_goods_index'),
    url(r'^goods/del/(?P<gid>[0-9]+)/$',viewsGoods.goodsdel,name='myadmin_goods_del'),
    url(r'^goods/edit/$',viewsGoods.goodsedit,name='myadmin_goods_edit'),

    # 订单管理
    url(r'^order/index/$',viewsOrders.orderindex,name='myadmin_order_index'),
    url(r'^order/info/$',viewsOrders.orderinfo,name='myadmin_order_info'),
    # 修改订单状态
    url(r'^order/status/$',viewsOrders.orderstatus,name='myadmin_order_status'),

    
]
